GXGetColorProfile
You can use theGXGetColorProfile
function to retrieve the profile data from a color profile object.
long GXGetColorProfile(gxColorProfile source, void *colorProfileData);
source
- A reference to the color profile object to get the profile data from.
- colorProfileData
- A pointer to a buffer. On return, the buffer contains the profile data for the source color profile.
- function result
- The size in bytes of the source color profile's profile data.
DESCRIPTION
TheGXGetColorProfile
function returns the profile data from the source color profile in the buffer pointed to by theresponses
parameter. It also returns the size of the profile data as the function result.The profile data returned by this function is a ColorSync color profile structure (type
CMProfile
).If you specify
nil
for the colorProfileData parameter, this function does not return the profile data, but it nevertheless returns a correct value for the size of the profile response structure in the function result. Thus you can make an initial call toGXGetColorProfile
to determine the size of buffer to allocate, and then call it once more to get the profile data itself.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory colorProfile_is_nil SEE ALSO
To replace the profile data in a color profile object, use theGXSetColorProfile
function, described in the next section.The format of the profile data in a color profile object is described in the section "Profile Data" beginning on page 4-36. The ColorSync Utilities, including the
CMProfile
data type, are described in Inside Macintosh: Advanced Color Imaging.